
angular.module('mamApp').factory('CPExamineManager', ['$http','api','paramsManager', function ($http,api,paramsManager) {
    var CPExamineManager = {
        /**
         * s审核CP列表
         * @param params[pageNo,pageSize]
         * @returns result
         */
        CPExamineList: function (params,query) {
            return $http.get(api+'/admin/cp/userlist/'+paramsManager.params(params)+paramsManager.query(query)).then(function (result) {
                return result;
            });
        },
        /**
         * 获取个人详情
         * @returns result
         */
        personalMaterial: function (cpId) {
            return $http.get(api+'/admin/cp/personal/'+cpId).then(function (result) {
                return result;
            });
        },
        /**
         * 获取机构详情
         * @returns result
         */
        companyMaterial: function (cpId) {
            return $http.get(api+'/admin/cp/company/'+cpId).then(function (result) {
                return result;
            });
        },
        /**
         * 获取主播标签
         * @returns result
         */
        addLabel: function () {
            return $http.get(api+'/admin/tags/anchortags').then(function (result) {
                return result;
            });
        },
        /**
         * 审核机构CP
         * @returns result
         */
        auditing: function (cpId,params)  {
            return $http.put(api+'/admin/cp/review/'+cpId,params).then(function (result) {
                return result;
            });
        },
        /**
         * 修改CP状态
         * @returns result
         */
        CPStatus:function (cpId,params) {
            return $http.put(api+'/admin/cp/'+cpId,params).then(function (result) {
                return result;
            });
        }





    };

    return CPExamineManager;
}]);
